/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.gwc.yy.liuxue.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.gwc.yy.liuxue.entity.Visa;
import com.gwc.extendsplat.sys.dao.SysAttachfileDao;
import com.gwc.yy.liuxue.dao.ProfIntroDao;
import com.gwc.yy.liuxue.dao.VisaDao;

/**
 * 签证材料Service
 * @author 黎俊涛
 * @version 2017-07-05
 */
@Service
@Transactional(readOnly = true)
public class VisaService extends CrudService<VisaDao, Visa> {
	@Autowired
	private SysAttachfileDao sysAttachfileDao;
	
	public Visa get(String id) {
		return super.get(id);
	}
	
	public List<Visa> findList(Visa visa) {
		return super.findList(visa);
	}
	
	public Page<Visa> findPage(Page<Visa> page, Visa visa) {
		return super.findPage(page, visa);
	}
	
	@Transactional(readOnly = false)
	public void save(Visa visa) {
		super.save(visa);
		String [] visas =  visa.getFile_label();
		for (String string2 : visas) {
			sysAttachfileDao.saveFileLabel(visa.getId(), string2);
		}
		
	}
	
	@Transactional(readOnly = false)
	public void delete(Visa visa) {
		super.delete(visa);
	}
	
}